/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var processID = "";

function process() {
    var body = document.getElementById("_body");
    body.innerHTML = requestPage("Process.main.jsp");
}
function addActivity() {
    var body = document.getElementById("_body");
    body.innerHTML = requestPage("Activity.form.jsp");
}
function addCondition() {
    var body = document.getElementById("_body");
    body.innerHTML = requestPage("Condition.form.jsp");
}
function expActivity() {
    var img = document.getElementById("processActivity");
    var divActivity = document.getElementById("activityList");
    var divProcessControl = document.getElementById("divProcessControl");
    if( divActivity.style.visibility == "hidden" ) {
        img.src = "../imgs/folder_explore.png";
        divProcessControl.style.position = "static";
        divActivity.style.visibility = "visible";
        query();
    } else {
        divProcessControl.style.position = "absolute";
        divProcessControl.style.top = "450px";
        img.src = "../imgs/folder.png";
        divActivity.style.visibility = "hidden";
    }
}
function expCondition() {
    var img = document.getElementById("processActivity");
    var divActivity = document.getElementById("conditionList");
    var divProcessControl = document.getElementById("divActivityControl");
    if( divActivity.style.visibility == "hidden" ) {
        img.src = "../imgs/folder_explore.png";
        divProcessControl.style.position = "static";
        divActivity.style.visibility = "visible";
        query();
    } else {
        divProcessControl.style.position = "absolute";
        divProcessControl.style.top = "450px";
        img.src = "../imgs/folder.png";
        divActivity.style.visibility = "hidden";
    }
}

